package com.simple.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.simple.entity.entity.ConversationPresetRel;
import com.simple.mapper.ConversationPresetRelMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @desc
 * @Author Simple
 * @Date 2025/7/8 23:19
 **/
@Slf4j
@Service
public class ConversationPresetRelService extends ServiceImpl<ConversationPresetRelMapper, ConversationPresetRel> {

    public boolean softDelBy(Long userId, Long convId) {
        return this.lambdaUpdate()
                .eq(ConversationPresetRel::getUserId, userId)
                .eq(ConversationPresetRel::getUserConvId, convId)
                .set(ConversationPresetRel::getIsDeleted, Boolean.TRUE).update();
    }
}
